package structural.adapter.object;

/**
 * @ClassName: Computer
 * @Description: 电脑类
 * @Author: liu-hao
 * @Date: 2023-04-11 11:36
 * @Version: 1.0
 **/
public class Computer {

    public String readSD(SDCard sdCard) {
        if (sdCard == null) {
            throw new NullPointerException("sd card is null");
        }
        return sdCard.readSD();
    }

    public void writeSD(SDCard sdCard, String msg) {
        if (sdCard == null) {
            throw new NullPointerException("sd card is null");
        }
        sdCard.writeSD(msg);
    }

}
